// Strip.h: interface for the CStrip class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_STRIP_H__B1FD5659_2BC4_4D92_BCA0_E20B5FFD7741__INCLUDED_)
#define AFX_STRIP_H__B1FD5659_2BC4_4D92_BCA0_E20B5FFD7741__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CStrip  
{
private:
	float mHeight;
	int mBin;
	bool mIsBacktracked;
	
public:
	CStrip();
	CStrip(float height);
	virtual ~CStrip();
	bool IsBacktracked(){ return mIsBacktracked;};
	void SetBacktracked(bool value){mIsBacktracked = value;};
	float GetHeight(){ return mHeight;};
	void SetHeight(float height){mHeight = height;};
	void SetBin(int binIndex){mBin = binIndex;};
	int GetBin(){return mBin;};
};

class CStripList
{
private:
	int mCurrentAvailableStrip;
	int mSize;
public:
	CStrip *mListStrip;
	CStripList(float *listHeight, int stripNumber);
	CStripList(CStripList &stripList, int stripNumber, bool copyFilledStrip);
	CStripList(CStripList &stripList);
	CStripList();
	virtual ~CStripList();
	CStrip* GetLongestAvailableStrip();
	CStrip& GetValue(int index){ return mListStrip[index];};
	CStrip& GetValueUnfilled(int index){ return mListStrip[mCurrentAvailableStrip + index];};
	int GetCurrentAvailableStrip(){ return mCurrentAvailableStrip ;};
	bool SetBinValue(int index, int binIndex);
	
	bool SetBinValueForUnfilledElm(int index, int binIndex);
	
	int GetNumberOfUnfilledStrip()
	{ 
		return mSize - mCurrentAvailableStrip;
	};
	int GetSize(){ return mSize;};
	//Set the bin value of strip at index back to -1;
	void ResetBinValue(int index);
	//InsertAStrip(double objectHeight);
};
#endif // !defined(AFX_STRIP_H__B1FD5659_2BC4_4D92_BCA0_E20B5FFD7741__INCLUDED_)
